package com.dzl.admin.service.impl;

import com.dzl.admin.dao.SysPermissionMapper;
import com.dzl.admin.pojo.SysPermission;
import com.dzl.admin.pojo.vo.PermissionVo;
import com.dzl.admin.service.SysPermissionService;
import com.dzl.base.service.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 权限表(SysPermission)表服务实现类
 *
 * @author caobucao
 * @since 2021-05-13 15:47:38
 */
@Service("sysPermissionService")
public class SysPermissionServiceImpl extends BaseServiceImpl<SysPermission> implements SysPermissionService {

    @Autowired
    private SysPermissionMapper sysPermissionMapper;

    @Override
    public List<PermissionVo> selectPermissionListByRoleId(Integer roleId) {
        return sysPermissionMapper.selectPermissionListByRoleId(roleId);
    }

    @Override
    public List<SysPermission> queryPermissionByMenuId(Integer id) {
        return sysPermissionMapper.queryPermissionByMenuId(id);
    }
}
